package com.snow.conditions;

import cn.hutool.core.date.DateUtil;

import java.util.Date;

public enum DayTimeOffset {
    Start, END, NONE;

    public Date of(Date now){
        if (this == NONE) {
            return now;
        } else if (this == Start) {
            return DateUtil.beginOfDay(now);
        }else {
            return DateUtil.endOfDay(now);
        }
    }
}
